package com.situ.vivamarket.dao;

import com.situ.vivamarket.model.Order;
import com.situ.vivamarket.model.front.OrderItem;
import com.situ.vivamarket.model.search.OrderSearchBean;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

@Mapper
public interface OrderDao {
    int insert(Order order);

    int insertOrderItem(OrderItem orderItem);


    Order findById(Integer id);

    int patch(Order order);

    Order findByOrderNo(String orderNo);

    Order findLastCreatedOrderByMemberId(Integer memberId);

    List<Order> findByMemberId(Integer memberId);

    List<Order> findAll(OrderSearchBean osb);

    int deleteByIds(Integer[] ids);

    int deleteOrderItemsByOrderIds(Integer[] ids);


}
